import {
  ACCEPT_SHOP_APPLICATION_AGREEMENT,
  CLEAR_SHOP_APPLICATION_AGREEMENT_ACCEPTANCE,
  RECORD_SHOP_APPLICATION_AGREEMENT_SOURCE,
} from '@/assets/constants/mutations';

export const state = () => ({
  shopApplicationAgreementAccepted: false,
  shopApplicationAgreementSource: null,
});

export const mutations = {
  [ACCEPT_SHOP_APPLICATION_AGREEMENT](state) {
    state.shopApplicationAgreementAccepted = true;
  },
  [CLEAR_SHOP_APPLICATION_AGREEMENT_ACCEPTANCE](state) {
    state.shopApplicationAgreementAccepted = false;
  },
  [RECORD_SHOP_APPLICATION_AGREEMENT_SOURCE](state, source) {
    state.shopApplicationAgreementSource = source;
  },
};
